import unittest

class polinomio:
	
	def __init__(self):
		pass
		
	
	def buscar_raices(self,a,b,c):
		self._a=a
		self._b=b
		self._c=c
		if (self._a==0):
			return False
		else:
			primer=-1*self._b+self.calcularraiz(a,b,c)
			segundo=-1*self._b-self.calcularraiz(a,b,c)
			return primer/2*self._a
			
		
			
	def calcularraiz(self,a,b,c):
		c=self._b**2
		d=4*self._a*self._c
		return (c-d)**(1/2)



class poliTest(unittest.TestCase):
	
	def test_1(self):
		
		self.assertEqual(polinomio().buscar_raices(2,2,1),-2)

if __name__=="__main__":
	unittest.main()
